package de.argh.codebook.service;

import java.util.List;

import de.argh.codebook.model.Article;
import de.argh.codebook.model.PageState;

/**
 * 
 * @author Rose
 * 
 */
public interface ArticleService {

  /**
   * Loads an article by its internal identifier.
   * 
   * @param id
   * @return
   */
  Article getArticleById(Long id);

  /**
   * Load all comments of an article, identified by its id.
   * 
   * @param id
   * @return
   */
  List<Article> getCommentsForArticle(Long id);

  /**
   * Loads articles from a certain point. This method will be used to load the
   * articles for the start page.
   * 
   * @param coderId
   * @param pageState
   * @return
   */
  List<Article> getArticelOverview(Long coderId, PageState pageState);

  /**
   * Loads all articles from a coder.
   * 
   * @param coderId
   * @return
   */
  List<Article> getArticlesFromCoder(Long coderId);

  /**
   * Deletes an article with its comment tree;
   * 
   * @param id
   */
  void deleteArticle(Long id);
}
